<template>
  <div>
    <h2>移出事件监听器</h2>
    <p>Resize the window and check the console for messages.</p>
  </div>
</template>

<script setup lang="ts">
import { onMounted, onUnmounted } from 'vue'

const handleResize = () => {
  console.log('Window resized:', window.innerWidth, window.innerHeight)
}
onMounted(() => {
  window.addEventListener('resize', handleResize)
})
onUnmounted(() => {
  window.removeEventListener('resize', handleResize)
})
</script>

<style></style>
